package com.zzyl.mapper;

import com.github.pagehelper.Page;
import com.zzyl.dto.UserPageDto;
import com.zzyl.entity.User;
import com.zzyl.vo.UserPageVo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

@Mapper
public interface UserMapper {
    int deleteByPrimaryKey(Long id);

    int insert(User record);

    int insertSelective(User record);

    User selectByPrimaryKey(Long id);

    int updateByPrimaryKeySelective(User record);

    int updateByPrimaryKey(User record);

    /**
     * 这是Mybatis Generator拓展插件生成的方法(请勿删除).
     * This method corresponds to the database table sys_user
     *
     * @mbg.generated
     * @author hewei
     */
    int batchInsert(@Param("list") java.util.List<User> list);

    Page<UserPageVo> userPage(UserPageDto userPageDto);

    User selectByEmail(String email);

    void updateUserPassword(@Param("userId") Long userId,@Param("resetPassword") String resetPassword);

    void updateUserStatus(@Param("id") Long id,@Param("status") Integer status);

    void removeUser(Long userIds);

    void updateUser(User user);

    String getUserIdByUsername(String username);
}